/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dsmsforkjoin.joins;

import dsmsforkjoin.FJoin;
import java.util.ArrayList;
import tuplegenerator.Tuple;

/**
 *
 *
 */
public class NestedLoopJoinOperator<T1 extends Tuple, T2 extends Tuple> implements IJoinOperator<T1, T2> {

    @Override
    public void doJoin(FJoin<T1> fj1, FJoin<T2> fj2) {
        ArrayList<Tuple> tp1 = fj1.generate();
        ArrayList<Tuple> tp2 = fj2.generate();
        
        for (int i = 0; i < tp1.size(); i++) {
            
            for (int j = 0; j < tp2.size(); j++) {
                
                if (tp1.get(i).getKey() == tp2.get(j).getKey()) {
                    //System.out.println(tp1.get(i).toString() + "==>" + tp2.get(j).toString());
                }
                
            }
            
        }
        
    }
    
}
